

    <table class="table table-hover table-nomargin dataTable table-bordered dataTable-scroll-y dataTable-scroll-x">
        <thead>
            <tr class='thefilter'>
                <th class='with-checkbox'><input type="checkbox" name="check_all" id="check_all"></th>
                <th>Local</th>
                <th>Dirección</th>
                <th>Región</th>
                <th>Provincia</th>
                <th>Comuna</th>
            </tr>
        </thead>
        <tbody>

            <?php
            foreach ($stores as $value) {
                ?>
                <tr>
                    <td class="with-checkbox">
                        <input type="checkbox" name="check[]" value="<?php echo $value['id_store']; ?>" <?php echo ((count($value['UserStores']) == 1) ? 'checked' : ''); ?>>
                    </td>
                    <td><?php echo $value['name']; ?></td>
                    <td><?php echo $value['address']; ?></td>
                    <td><?php echo $value['Regiones']['name']; ?></td>
                    <td><?php echo $value['Regiones']['Provincias'][0]['name']; ?></td>
                    <td><?php echo $value['Regiones']['Provincias'][0]['Comunas'][0]['name']; ?></td>
                    

                </tr>
            <?php } ?>
        </tbody>
    </table>
